package com.own.component.mybatis.em;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * SqlMethodIgnoreLogicDelete
 *
 * @author chenxueli
 * @date 2020/9/22 9:14
 */
@Getter
@AllArgsConstructor
public enum SqlMethodIgnoreLogicDelete {

    /**
     * 修改
     */
    UPDATE_BY_ID("ignoreLogicDeleteUpdateById", "根据ID 选择修改数据", "<script>\nUPDATE %s %s WHERE %s=#{%s} %s\n</script>"),
    UPDATE("ignoreLogicDeleteUpdate", "根据 whereEntity 条件，更新记录", "<script>\nUPDATE %s %s %s %s\n</script>"),

    /**
     * 查询
     */
    SELECT_BY_ID("ignoreLogicDeleteSelectById", "根据ID 查询一条数据", "SELECT %s FROM %s WHERE %s=#{%s} %s"),

//    SELECT_BATCH_BY_IDS("selectBatchIds", "根据ID集合，批量查询数据", "<script>SELECT %s FROM %s WHERE %s IN (%s) %s </script>"),
//    @Deprecated
//    SELECT_ONE("selectOne", "查询满足条件一条数据", "<script>%s SELECT %s FROM %s %s %s\n</script>"),
//    SELECT_COUNT("selectCount", "查询满足条件总记录数", "<script>%s SELECT COUNT(%s) AS total FROM %s %s %s\n</script>"),
//    SELECT_LIST("selectList", "查询满足条件所有数据", "<script>%s SELECT %s FROM %s %s %s %s\n</script>"),
//    @Deprecated
//    SELECT_PAGE("selectPage", "查询满足条件所有数据（并翻页）", "<script>%s SELECT %s FROM %s %s %s %s\n</script>"),
//    SELECT_MAPS("selectMaps", "查询满足条件所有数据", "<script>%s SELECT %s FROM %s %s %s %s\n</script>"),
//    @Deprecated
//    SELECT_MAPS_PAGE("selectMapsPage", "查询满足条件所有数据（并翻页）", "<script>\n%s SELECT %s FROM %s %s %s %s\n</script>"),
//    SELECT_OBJS("selectObjs", "查询满足条件所有数据", "<script>%s SELECT %s FROM %s %s %s %s\n</script>");

    ;

    private final String method;
    private final String desc;
    private final String sql;

}
